<template>
     <div class="video">
      <ul class="m-cvrlst m-cvrlst-alb3 f-cb">
          <li v-for="(item , index) in vocalistData" :key="index">
              <div class="cover f-pr">
                  <img :src="item.coverUrl">
                  <p class="tr u-msk u-msk-1">
                      <span class="u-icn2 u-icn2-mv"></span>
                      {{Math.floor(item.playTime/1000)}}万
                  </p>
                 <p class="bl u-msk u-msk-2">04:53</p>
                 <a class="link" ></a>
              </div>
              <h4 class="title f-thide">
                  <i class="tag u-icn2 u-icn2-smvtag" v-if="!item.type"></i>
                  <a class="s-fc7">{{item.title}}</a>
            </h4>
            <h5 class="name f-thide">
                <span class="f-thide" title="颜人中">
                    <a href="/artist?id=31376161" class="s-fc3">{{item.creator[0].userName}}</a>
                </span>
            </h5>
          </li>
      </ul>
    </div>
</template>

<script>
import {searchResult} from "../../../network/search"
export default {
    props:["keywords"],
    data() {
        return {
            vocalistData:[]
        }
    },
    methods:{
         Result(keywords){
            searchResult(keywords,20, 0 ,1014).then(res => {
              for(const item of res.data.result.videos){
                  this.vocalistData.push(item)
              }
          })
       },
    },
    created(){
        this.Result(this.keywords)
    },
    watch:{
       keywords(value){
           this.vocalistData = []
           this.Result(value)
       }
   }
}

</script>

<style scoped>
  .video{width: 100%;margin-top: 20px;}
 .m-cvrlst-alb3 {  margin-left: -33px; min-height: 30px; }
 .m-cvrlst-alb3 li{ width: 159px; padding-left: 33px; float: left; display: inline-block; overflow: hidden; padding-bottom: 40px; line-height: 1.4}

    .m-mvlist .cover {
        width: 159px;
        height: 90px;
    }
    .f-pr {
        position: relative;
        zoom: 1;
     }
    .cover img {
    width: 100%;
    height: 90px;
     }

  .cover .tr {
    margin: 0;
    font-size: 12px;
    position: absolute;
    top: 0;
    right: 0;
    padding-right: 5px;
    height: 20px;
    line-height: 20px;
    color: #fff;
    box-sizing: border-box;
    text-align: right;
    text-shadow: -2px 1px rgb(0 0 0 / 40%);
    }
   .u-msk-1 {
    width: 90px;
    background-position: 0 0;
   } 


   .u-icn2-mv {
    width: 15px;
    height: 10px;
    background: url("../../../assets/imgs/icon2.png");
    background-position: -61px -310px;
    }
    .u-icn2{
    display: inline-block;
    }

    .cover .bl {
     font-size: 12px;
     margin: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    padding-left: 5px;
    height: 20px;
    line-height: 20px;
    color: #fff;
    text-shadow: -2px 1px rgb(0 0 0 / 40%);
   }
   .cover .link {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 9;
    background: url();
   }
   a{
       cursor: pointer
   }
   .title {
    width: 100%;
    height: auto;
    margin: 3px 0 1px;
    border: none;
    font-size: 14px;
    font-weight: normal;
}
   .f-thide {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: normal;
}

.tag {
    margin: -2px 4px auto auto;
}
.u-icn2 {
    background: url("../../../assets/imgs/icon2.png") no-repeat 0 9999px;
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
}
.u-icn2-smvtag {
    width: 26px;
    height: 16px;
    background-position: -270px -480px;
}

.s-fc7:hover {
    color: #000;
    text-decoration: underline;
}
.name {
    width: 100%;
    font-weight: normal;
    margin: 0;
}
.f-thide {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: normal;
}
a.s-fc3{
    color: #666;
    font-size: 12px;
}
.s-fc3:hover{
    text-decoration: underline;
}

</style>